#include <stdio.h>

int sum(int m);

int main()
{
    int i, n = 0;

    sum(50);

    for(i=1;i<=50;i++)
    {
        n += i;
    }

    printf("The sum of 1-50 is %d\n", n);

    return 0;
}

int sum(int m)
{
    int i, n = 0;

    for(i=1;i<=m;i++)
    {
        n += i;
    }

    printf("The sum of 1-m is %d\n", n);

    return n;
}
